package main

import "fmt"

func main() {
	// 案例3
	var ch3 = make(chan int, 3)
	x := 10
	ch3 <- x
	x = 20
	fmt.Println(<-ch3)
	var ch4 = make(chan *int, 3)
	y := 10
	ch4 <- &y
	y = 20
	fmt.Println(*(<-ch4))
}
